package com.jerry.alibaba.transaction.service;

import com.jerry.alibaba.transaction.entity.CommonResult;
import com.jerry.alibaba.transaction.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@Component
@FeignClient(value = "service-order")
public interface OrderFeignService {

    @PostMapping("/order/create")
    CommonResult create(Order order);

    @GetMapping("/order/get/{id}")
    CommonResult getById(@PathVariable("id") Long id);

    @GetMapping("/order/get")
    CommonResult getList();

}
